home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / misc / monlgtxt.z / monlgtxt
Text File  |  1996-05-11  |  2KB  |  76 lines

  1. Monologue for Windows
  2. Version 1.5 OEM
  3. The Text-to-Speech DLL Interface
  4.  
  5. April 23, 1993
  6.  
  7. This document describes how to directly access the First Byte speech
  8. engine from your program using the FB_SPCH.DLL.  After reading it, you
  9. will know how to add basic speech capabilities to your programs using
  10. the OpenSpeech, Say and CloseSpeech entry points.  the interface to
  11. these entry points is described in terms of  a 'C' language syntax.  It
  12. is assumed that the reader is familiar with loading and access a Windows
  13. DLL from his/her programming environment.
  14.  
  15. If greater control over the speech functions is required (e.g. animated
  16. mouth synchronization, word sync) or if your application must continue
  17. running while speech is in progress, we recommend purchasing the
  18. ProVoice for Windows Developers Toolkit.
  19.  
  20. The simplest text-to-speech functions can be performed with the
  21. following three routines:
  22.  
  23. OpenSpeech        initiate a session with the Speech Engine
  24.  
  25. CloseSpeech        close a session with the Speech Engine
  26.  
  27. Say            speak a buffer-full of text.  Does not return until all the text is     
  28.             spoken.
  29.  
  30. Function prototypes for these routines are as follows:
  31.  
  32. void FAR PASCAL  CloseSpeech  (long SCB);
  33.  
  34. long FAR PASCAL OpenSpeech (HWND hwnd, WORD mode, LPSR voiceType);
  35.  
  36. int FAR PASCAL  Say (long SCB, LPSTR lpText);
  37.  
  38. The OpenSpeech routine must be called once and only once before any of
  39. the other speech routines can be used.    It returns a SpeechControlBlock
  40. (SCB) which is required when calling any subsequent speech routines.
  41.  
  42. Before terminating, your application must call CloseSpeech for the SCB
  43. that was opened.  There is a snippet of code that calls all three of
  44. these functions:
  45.  
  46. LONG lSCB;
  47. lSCB = OpenSpeech (0, 0, NULL);
  48. Say (lSCB, "Hello world.");
  49. Say (lSCB, "Hello Again.");
  50. CloseSpeech (lSCB);
  51.  
  52.  
  53. If you are using the Microsoft of Borland linkers, and wish to
  54. explicitly import these DLL functions, you will need to add the
  55. following lines to your .DEF file:
  56.  
  57.     IMPORTS
  58.         FB_SPCH.CLOSESPEECH
  59.         FB_SPCH.OPENSPEECH
  60.         FB_SPCH.SAY
  61.  
  62. If you are using Microsoft Visual Basic, you should use the following
  63. Declarations:
  64.  
  65. Declare Function OpenSpeech Lib "\monologw\fb_spch.dll" (ByVal Hwnd%,
  66. ByVal mode%, ByVal voiceType&) As Long
  67.  
  68. Declare Function CloseSpeech Lib "\monologw\fb_spch.dll" (ByVal lpSCB&)
  69. As Integer
  70.  
  71. Declare Function Say Lib "\monologw\fb_spch.dll" (ByVal lpSCB&, ByVal
  72. phrase$) As Integer
  73.  
  74. Global lpSCB As Long
  75.  
  76.